<div>
    <div class="row" v-if="contractTypeManageInfo.componentShow == 'contractTypeList'">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="查询条件" namespace="contractTypeManage"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;"></div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入类型名称','contractTypeManage')"
                                       v-model="contractTypeManageInfo.conditions.typeName" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <select class="custom-select" v-model="contractTypeManageInfo.conditions.audit">
                                <option selected value="">{{vc.i18n('请选择审核','contractTypeManage')}}</option>
                                <option v-for="(item,index) in contractTypeManageInfo.audits" :key="index"
                                        :value="item.statusCd">{{item.name}}
                                </option>
                            </select>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm"
                                    v-on:click="_queryContractTypeMethod()">
                                <i class="fa fa-search"></i>
                                <span><vc:i18n name="查询" namespace="contractTypeManage"></vc:i18n></span>
                            </button>
                            <button type="button" class="btn btn-primary btn-sm"
                                    v-on:click="_resetContractTypeMethod()">
                                <i class="fa fa-repeat"></i>
                                <span><vc:i18n name="重置" namespace="contractTypeManage"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="contractTypeManageInfo.componentShow == 'contractTypeList'">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="合同类型" namespace="contractTypeManage"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-white btn-sm" v-on:click="_toAuditPage()"
                        v-if="vc.hasPrivilege('502020061767630003')">
                            设置审核人员
                        </button>
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddContractTypeModal()">
                            <i class="fa fa-plus"></i>添加
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                        <tr>
                            <th class="text-center">
                                <span><vc:i18n name="类型名称" namespace="contractTypeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="是否审核" namespace="contractTypeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="描述" namespace="contractTypeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="创建时间" namespace="contractTypeManage"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="操作" namespace="contractTypeManage"></vc:i18n></span>
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="contractType in contractTypeManageInfo.contractTypes">
                            <td class="text-center">{{contractType.typeName}}</td>
                            <td class="text-center">{{contractType.auditName}}</td>
                            <td class="text-center">{{contractType.remark}}</td>
                            <td class="text-center">{{contractType.createTime}}</td>
                            <td class="text-center">
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openContractTypeSpecModel(contractType)">
                                        <span><vc:i18n name="扩展信息" namespace="contractTypeManage"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openContractTemplate(contractType)">
                                        <span><vc:i18n name="合同模板" namespace="contractTypeManage"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openEditContractTypeModel(contractType)">
                                        <span><vc:i18n name="修改" namespace="contractTypeManage"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openDeleteContractTypeModel(contractType)">
                                        <span><vc:i18n name="删除" namespace="contractTypeManage"></vc:i18n></span>
                                    </button>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="7">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <div v-show="contractTypeManageInfo.componentShow != 'contractTypeList'">
        <vc:create path="admin/addTemplateView"></vc:create>
    </div>
    <vc:create path="admin/addContractType" callBackListener="" callBackFunction=""></vc:create>
    <vc:create path="admin/editContractType"></vc:create>
    <vc:create path="admin/deleteContractType"></vc:create>
</div>